<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp" %>
<!DOCTYPE html>
<html lang="en">
<head>
    <!-- header -->
    <%@ include file="/WEB-INF/views/include/header.jsp" %>
</head>
<body class="no-skin">
<!-- #section:basics/navbar.layout -->
<div id="navbar" class="navbar navbar-default">
    <script type="text/javascript">
        try {
            ace.settings.check('navbar', 'fixed')
        } catch (e) {
        }
    </script>
    <div class="navbar-container" id="navbar-container">
        <!-- #section:basics/sidebar.mobile.toggle -->
        <button type="button" class="navbar-toggle menu-toggler pull-left" id="menu-toggler" data-target="#sidebar">
            <span class="sr-only">Toggle sidebar</span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
        </button>

        <!-- /section:basics/sidebar.mobile.toggle -->
        <div class="navbar-header pull-left">
            <!-- #section:basics/navbar.layout.brand -->
            <a href="#" class="navbar-brand">
                <small>
                    <i class="fa fa-leaf"></i>
                    永泰县督查管理系统
                </small>
            </a>

            <!-- /section:basics/navbar.layout.brand -->
            <!-- #section:basics/navbar.toggle -->
            <!-- /section:basics/navbar.toggle -->
        </div>

        <!-- #section:basics/navbar.dropdown -->
        <div class="navbar-buttons navbar-header pull-right" role="navigation">
            <ul class="nav ace-nav">
                <li class="purple">
                    <ul class="dropdown-menu-right dropdown-navbar navbar-pink dropdown-menu dropdown-caret dropdown-close">
                        <li class="dropdown-header">
                            <i class="ace-icon fa fa-exclamation-triangle"></i>
                        </li>
                        <li class="dropdown-content">
                            <ul class="dropdown-menu dropdown-navbar navbar-pink">
                                <%--<li>
                                    <c:if test="${dept.deptRelation=='/01/'}">
                                        <a href="javascript:openapp('/taskMain/noDoneMain/','daiban1','待办事项');">
                                    </c:if>
                                    <c:if test="${dept.deptRelation=='/02/201/' or dept.deptRelation == '/02/202/'}">
                                        <a href='javascript:openapp("/taskUnit/noDoneUnit/","daiban2","待办事项");'>
                                    </c:if>
                                        <div class="clearfix">
                                                <span class="pull-left">
                                                    <i class="btn btn-xs no-hover btn-pink fa fa-comment"></i>
                                                    新消息
                                                </span>
                                            <span class="pull-right badge badge-info">${dwc}</span>
                                        </div>
                                    </a>
                                </li>--%>

                                <%--<li>
                                    <a href="#">
                                        <i class="btn btn-xs btn-primary fa fa-user"></i>
                                        Bob just signed up as an editor ...
                                    </a>
                                </li>

                                <li>
                                    <a href="#">
                                        <div class="clearfix">
                                            <span class="pull-left">
                                                <i class="btn btn-xs no-hover btn-success fa fa-shopping-cart"></i>
                                                New Orders
                                            </span>
                                            <span class="pull-right badge badge-success">+8</span>
                                        </div>
                                    </a>
                                </li>

                                <li>
                                    <a href="#">
                                        <div class="clearfix">
                                            <span class="pull-left">
                                                <i class="btn btn-xs no-hover btn-info fa fa-twitter"></i>
                                                Followers
                                            </span>
                                            <span class="pull-right badge badge-info">+11</span>
                                        </div>
                                    </a>
                                </li>--%>
                            </ul>
                        </li>

                        <%--<li class="dropdown-footer">
                            <a href="#">
                                See all notifications
                                <i class="ace-icon fa fa-arrow-right"></i>
                            </a>
                        </li>--%>
                    </ul>
                </li>

                <%--<li class="green">
                    <a data-toggle="dropdown" class="dropdown-toggle" href="#">
                        <i class="ace-icon fa fa-envelope icon-animated-vertical"></i>
                        <span class="badge badge-success">5</span>
                    </a>

                    <ul class="dropdown-menu-right dropdown-navbar dropdown-menu dropdown-caret dropdown-close">
                        <li class="dropdown-header">
                            <i class="ace-icon fa fa-envelope-o"></i>
                            5 Messages
                        </li>

                        <li class="dropdown-content">
                            <ul class="dropdown-menu dropdown-navbar">
                                <li>
                                    <a href="#" class="clearfix">
                                        <img src="<s:url value="/assets/avatars/avatar.png"></s:url>" class="msg-photo" alt="Alex's Avatar" />
                                        <span class="msg-body">
                                            <span class="msg-title">
                                                <span class="blue">Alex:</span>
                                                Ciao sociis natoque penatibus et auctor ...
                                            </span>

                                            <span class="msg-time">
                                                <i class="ace-icon fa fa-clock-o"></i>
                                                <span>a moment ago</span>
                                            </span>
                                        </span>
                                    </a>
                                </li>

                                <li>
                                    <a href="#" class="clearfix">
                                        <img src="<s:url value="/assets/avatars/avatar3.png"></s:url>" class="msg-photo" alt="Susan's Avatar" />
                                        <span class="msg-body">
                                            <span class="msg-title">
                                                <span class="blue">Susan:</span>
                                                Vestibulum id ligula porta felis euismod ...
                                            </span>

                                            <span class="msg-time">
                                                <i class="ace-icon fa fa-clock-o"></i>
                                                <span>20 minutes ago</span>
                                            </span>
                                        </span>
                                    </a>
                                </li>

                                <li>
                                    <a href="#" class="clearfix">
                                        <img src="<s:url value="/assets/avatars/avatar4.png"></s:url>" class="msg-photo" alt="Bob's Avatar" />
                                        <span class="msg-body">
                                            <span class="msg-title">
                                                <span class="blue">Bob:</span>
                                                Nullam quis risus eget urna mollis ornare ...
                                            </span>

                                            <span class="msg-time">
                                                <i class="ace-icon fa fa-clock-o"></i>
                                                <span>3:15 pm</span>
                                            </span>
                                        </span>
                                    </a>
                                </li>

                                <li>
                                    <a href="#" class="clearfix">
                                        <img src="<s:url value="/assets/avatars/avatar2.png"></s:url>" class="msg-photo" alt="Kate's Avatar" />
                                        <span class="msg-body">
                                            <span class="msg-title">
                                                <span class="blue">Kate:</span>
                                                Ciao sociis natoque eget urna mollis ornare ...
                                            </span>

                                            <span class="msg-time">
                                                <i class="ace-icon fa fa-clock-o"></i>
                                                <span>1:33 pm</span>
                                            </span>
                                        </span>
                                    </a>
                                </li>

                                <li>
                                    <a href="#" class="clearfix">
                                        <img src="<s:url value="/assets/avatars/avatar5.png"></s:url>" class="msg-photo" alt="Fred's Avatar" />
                                        <span class="msg-body">
                                            <span class="msg-title">
                                                <span class="blue">Fred:</span>
                                                Vestibulum id penatibus et auctor  ...
                                            </span>

                                            <span class="msg-time">
                                                <i class="ace-icon fa fa-clock-o"></i>
                                                <span>10:09 am</span>
                                            </span>
                                        </span>
                                    </a>
                                </li>
                            </ul>
                        </li>

                        <li class="dropdown-footer">
                            <a href="inbox.html">
                                See all messages
                                <i class="ace-icon fa fa-arrow-right"></i>
                            </a>
                        </li>
                    </ul>
                </li>--%>
                <!-- #section:basics/navbar.user_menu -->
                <li class="light-blue">
                    <a data-toggle="dropdown" href="#" class="dropdown-toggle">
                        <span class="user-info">
									<small>欢迎回来</small>
									<shiro:principal property="name"/>
								</span>

                        <i class="ace-icon fa fa-caret-down"></i>
                    </a>

                    <ul class="user-menu dropdown-menu-right dropdown-menu dropdown-yellow dropdown-caret dropdown-close">
                        <li>
                            <a href="javascript:void(0)" id="userInfo">
                                <i class="ace-icon fa fa-user"></i>
                                个人信息
                            </a>
                        </li>

                        <li class="divider"></li>
                        <li>
                            <a href="javascript:void(0)" id="changePass">
                                <i class="ace-icon fa fa-cog"></i>
                                密码修改
                            </a>
                        </li>
                        <li class="divider"></li>

                        <li>
                            <a href="<s:url value="/logout"/>">切换用户 </a>
                            <%--数字峰会--%>
                            <%--<a href="<s:url value="/index/logout"/>">
                                <i class="ace-icon fa fa-power-off"></i>
                                退出系统
                            </a>--%>

                        </li>
                    </ul>
                </li>

                <!-- /section:basics/navbar.user_menu -->
            </ul>
        </div>

        <!-- /section:basics/navbar.dropdown -->
    </div><!-- /.navbar-container -->
</div>

<!-- /section:basics/navbar.layout -->
<div class="main-container" id="main-container">
    <script type="text/javascript">
        try {
            ace.settings.check('main-container', 'fixed')
        } catch (e) {
        }
    </script>

    <!-- #section:basics/sidebar -->
    <div id="sidebar" class="sidebar                  responsive">
        <script type="text/javascript">
            try {
                ace.settings.check('sidebar', 'fixed')
            } catch (e) {
            }
        </script>

        <div class="sidebar-shortcuts" id="sidebar-shortcuts">
            <div class="sidebar-shortcuts-large" id="sidebar-shortcuts-large">
                <button class="btn btn-success">
                    <i class="ace-icon fa fa-signal"></i>
                </button>

                <button class="btn btn-info">
                    <i class="ace-icon fa fa-pencil"></i>
                </button>

                <!-- #section:basics/sidebar.layout.shortcuts -->
                <button class="btn btn-warning">
                    <i class="ace-icon fa fa-users"></i>
                </button>

                <button class="btn btn-danger">
                    <i class="ace-icon fa fa-cogs"></i>
                </button>

                <!-- /section:basics/sidebar.layout.shortcuts -->
            </div>

            <div class="sidebar-shortcuts-mini" id="sidebar-shortcuts-mini">
                <span class="btn btn-success"></span>

                <span class="btn btn-info"></span>

                <span class="btn btn-warning"></span>

                <span class="btn btn-danger"></span>
            </div>
        </div><!-- /.sidebar-shortcuts -->

        <ul class="nav nav-list">
            <c:forEach items="${menus }" var="menu">
                <li class="">
                    <a
                            <c:if test="${fn:length(menu.menus) > 0 }">
                                class="dropdown-toggle"
                            </c:if>
                            <c:if test="${fn:length(menu.menus) == 0 }">
                                href="javascript:openapp('${pageContext.request.contextPath}${menu.url }','${menu.menuEnname }','${menu.menuName }');"
                            </c:if>
                    >

                        <i class="menu-icon fa ${menu.icon }"></i>
                        <span class="menu-text " style="font-size: 15px">${menu.menuName}
                             <c:if test="${menu.menuName == '已完成事项' or menu.menuName == '已完成任务'}">
                                 <span class="menu-text"><strong>（${ywc}）</strong></span>
                             </c:if>
                             <c:if test="${menu.menuName == '待办事项' or menu.menuName == '待办任务'}">
                                 <span class="menu-text"> <strong>（${dwc}）</strong></span>
                             </c:if>
                            <c:if test="${menu.menuName == '在办事项' or menu.menuName == '在办任务'}">
                                 <span class="menu-text"> <strong>（${zb}）</strong></span>
                             </c:if>
                            <c:if test="${menu.menuName == '催办信息'}">
                                 <span class="menu-text"> <strong>（${cb}）</strong></span>
                             </c:if>
                        </span>
                        <c:if test="${fn:length(menu.menus) > 0 }">
                            <b class="arrow fa fa-angle-down"></b>
                        </c:if>
                    </a>

                    <b class="arrow"></b>
                    <c:if test="${fn:length(menu.menus) > 0 }">
                        <c:set scope="request" var="childs" value="${menu.menus }"></c:set>
                        <c:import url="/WEB-INF/views/modules/menu.jsp"></c:import>
                    </c:if>
                </li>
            </c:forEach>
        </ul><!-- /.nav-list -->

        <!-- #section:basics/sidebar.layout.minimize -->
        <div class="sidebar-toggle sidebar-collapse" id="sidebar-collapse">
            <i class="ace-icon fa fa-angle-double-left" data-icon1="ace-icon fa fa-angle-double-left"
               data-icon2="ace-icon fa fa-angle-double-right"></i>
        </div>

        <!-- /section:basics/sidebar.layout.minimize -->
        <script type="text/javascript">
            try {
                ace.settings.check('sidebar', 'collapsed')
            } catch (e) {
            }
        </script>
    </div>

    <!-- /section:basics/sidebar -->
    <div class="main-content">
        <div class="main-content-inner">
            <!-- #section:basics/content.breadcrumbs -->
            <div class="breadcrumbs" id="breadcrumbs">
                <script type="text/javascript">
                    try {
                        ace.settings.check('breadcrumbs', 'fixed')
                    } catch (e) {
                    }
                </script>
                <a id="task-pre" class="task-changebt"><i class="fa fa-chevron-left"></i></a>
                <div style="width: 118px;" id="task-content">
                    <ul style="width: 118px; margin-left: 0px;" class="macro-component-tab" id="task-content-inner">
                        <li class="macro-component-tabitem noclose current" app-id="mainContainer"
                            app-url="<s:url value="/mainContainer"></s:url>" app-name="系统首页">
                            <span class="macro-tabs-item-text">系统首页</span>
                        </li>
                    </ul>
                    <div style="clear:both;"></div>
                </div>
                <a id="task-next" class="task-changebt"><i class="fa fa-chevron-right"></i></a>
            </div>

            <!-- /section:basics/content.breadcrumbs -->
            <div class="page-content">
                <!-- #section:settings.box -->

                <!-- /section:settings.box -->
                <div class="row">
                    <div class="col-xs-12" id="content">
                        <!-- PAGE CONTENT BEGINS -->
                        <iframe src="<s:url value="/mainContainer"></s:url>"
                                style="width: 100%; height: 100%; display: inline;" id="appiframe-mainContainer"
                                class="appiframe" frameborder="0"></iframe>
                        <!-- PAGE CONTENT ENDS -->
                    </div><!-- /.col -->
                </div><!-- /.row -->
            </div><!-- /.page-content -->
        </div>
    </div><!-- /.main-content -->

    <a href="#" id="btn-scroll-up" class="btn-scroll-up btn btn-sm btn-inverse">
        <i class="ace-icon fa fa-angle-double-up icon-only bigger-110"></i>
    </a>

    <!-- dialog -->
    <%@ include file="/WEB-INF/views/include/dialog.jsp" %>
</div><!-- /.main-container -->

<!-- footer -->
<%@ include file="/WEB-INF/views/include/footer.jsp" %>
</body>

<script type="text/javascript">
    $("#deptRole li").click(function () {
        var deptId = $(this).attr("deptId");
        var roleId = $(this).attr("roleId");
        location.href = "<s:url value="/changeDeptRole"/>?deptId=" + deptId + "&roleId=" + roleId;
    });

    //用户个人信息
    $("#userInfo").click(function () {
        loadDialog({
            dialogUrl: '<s:url value="/modules/sys/user/profile"/>',
            dialogTitle: "更新对话框",
            dialogFoot: '<button type="button" class="btn btn-primary" onclick="edit()">更新</button>' +
            '<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>'
        });
    });

    //执行更新操作
    function edit() {
        postCallBack({
            data: $("#formDialog form").serialize(),
            url: '<s:url value="/modules/sys/user/saveProfile"/>',
            successMessage: "更新成功",
            successTitle: '更新对话框',
            failMessage: '更新失败',
            failTitle: '消息对话框',
            successFunc: function (data) {
                $("#formDialog").modal('hide');
            }
        });
    }

    //用户修改密码界面
    $("#changePass").click(function () {
        loadDialog({
            dialogUrl: '<s:url value="/modules/sys/user/showChangePassView"/>',
            dialogTitle: "更新对话框",
            dialogFoot: '<button type="button" class="btn btn-primary" onclick="editPass()">更新</button>' +
            '<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>'
        });
    });

    //执行更新密码操作
    function editPass() {
        postCallBack({
            data: $("#formDialog form").serialize(),
            url: '<s:url value="/modules/sys/user/changePass"/>',
            successMessage: "更新成功",
            successTitle: '更新对话框',
            failMessage: '更新失败',
            failTitle: '消息对话框',
            successFunc: function (data) {
                $("#formDialog").modal('hide');
            }
        });
    }
</script>
</html>